﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition.Hosting;
using System.Linq;
using System.Text;

namespace WooCoo.IoC
{
    /// <summary>
    /// 容器静态化,需要在Appcation
    /// </summary>
    /// <example>
    /// //可在程序初始化时注入
    /// //需要引入System.ComponentModel.Composition.dll
    /// var catalog = new AggregateCatalog();
    ///   //Dll方式
    /// catalog.Catalogs.Add(new AssemblyCatalog(typeof(MefTest).Assembly));
    /// //文件路径方式
    /// AggregateCatalog catalog = new AggregateCatalog
    ///      (new DirectoryCatalog(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory)));  
    /// WooCoo.IoC.Container.Current = new WooCoo.IoC.MEFAdapter(new Lazy〈CompositionContainer〉
    ///     (() => new CompositionContainer(catalog)));
    /// </example>
    public static class Container
    {
        public static IContainer Current { get; set; }

        static Container()
        {
        }
    }
}
